// pages/getdevice/getdevice.js
Page({

  /**
   * 页面的初始数据
   */
  data: {
    result:''
  },

  /**
   * 生命周期函数--监听页面加载
   */
  onLoad: function (options) {

  },

  ScanDevice:function(){

    wx.scanCode({
      success: (res) => {
        var result = res.result;
        
        wx.redirectTo({
          url: 'pages/device/device?code='+result,
          success: function(res){

          },
          fail: function() {
            // fail
          },
          complete: function() {
            // complete
          }
        })
       
      }
    })


  },

  Backskip:function(){
      wx.redirectTo({
        url: '/pages/login/login',
        success: function(res){
          // success
        },
        fail: function() {
          // fail
        },
        complete: function() {
          // complete
        }
      })
  }


})